package com.wsk.api.factory;

import com.alibaba.dubbo.common.extension.SPI;
import com.wsk.api.bean.*;

/**
 * @DESCRIPTION :
 * @AUTHOR : WuShukai1103
 * @TIME : 2017/12/8  23:35
 */
@SPI(value = "user")
public class UserFactoryImpl implements UserFactory {
    public User getUser(UserEnum user) {
        switch (user) {
            case Simple:
                return new SimpleUser();
            case Admin:
                return new AdminUser();
            case Super:
                return new SuperUser();
            default:
                return new User();
        }
    }
}
